package com.yhl.admin.mapper;

import com.yhl.admin.bean.City;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author yhl
 * @create 2021-06-28 10:18
 */
@Mapper
public interface CityMapper {

    @Insert("insert into city(id, name, address) values(#{id}, #{name}, #{address});")
    int insertCity(City city);


    @Select("select id, name, address from city where id = #{id};")
    City selectCity(int id);
}
